package lab02.test20;

/**
 * Created by dell on 2017/11/1.
 */
import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        //从键盘输入一行含有数字和字符的字符串

        String input = new Scanner(System.in).next();
        System.out.println("请输入包含字符的字符串");

        //仅仅输出字符串中的全部数字字符
        char tmp;
        for (int i = 0; i < input.length(); i++) {
            tmp = input.charAt(i);
            if (tmp >= '0' && tmp <= '9') {
                System.out.print(tmp);
            }
        }
    }
}
